﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.ComponentModel;
using Dissemination.MVC.Helpers;

namespace Dissemination.MVC.Models
{
    /// <summary>
    /// Partial class for the model used to add the metadata
    /// </summary>
    [MetadataType(typeof(ParticipantMetaData))]
    public partial class Participant
    {
        /// <summary>
        /// Metadata class for the model
        /// </summary>
        [Bind(Exclude = "ParticipantID")]
        public class ParticipantMetaData
        {
            [DisplayName("Name")]
            [Required(ErrorMessage = "The participant name is required")]
            [StringLength(256)]
            public string ParticipantName { get; set; }

            [DisplayName("Surname")]
            [Required(ErrorMessage = "The participant surname is required")]
            [StringLength(256)]
            public string ParticipantSurname { get; set; }

            [DisplayName("Age")]
            public int ParticipantAge { get; set; }

            [StringLength(256)]
            [DisplayName("Email")]
            [EmailAttribute(ErrorMessage = "The e-mail format is incorrect")]
            public string ParticipantEmail { get; set; }

            [DisplayName("Organization")]
            public string ParticipantOrganization { get; set; }

            [DisplayName("Department")]
            public string ParticipantDepartment { get; set; }

            [DisplayName("Position")]
            public string ParticipantPosition { get; set; }

            [DisplayName("Speciality")]
            public string ParticipantSpeciality { get; set; }

            [DisplayName("Address")]
            public string ParticipantAddress { get; set; }

            [DisplayName("PostalCode")]
            public string ParticipantPostalCode { get; set; }

            [DisplayName("City")]
            public string ParticipantCity { get; set; }

            [DisplayName("Phone")]
            public string ParticipantPhone { get; set; }

            [DisplayName("Fax")]
            public string ParticipantFax { get; set; }
        }
    }
}